package com.seeingtv.common.utils.xml;

import javax.xml.bind.annotation.adapters.XmlAdapter;

/**
 * @author hubert
 * @date 2018/6/5
 * @description CDataAdapter
 */
public class CDataAdapter extends XmlAdapter<String, String> {

	@Override
	public String unmarshal(String value) throws Exception {
		return value;
	}

	@Override
	public String marshal(String value) throws Exception {
		return new StringBuilder("<![CDATA[").append(value).append("]]>").toString();
	}

}
